package com.ruoyi.warning.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author chenhc
 * @since 2025-03-25
 */
@Data
@TableName("sensors")
@ApiModel("传感器")
public class Sensor implements Serializable {

    @TableId(value = "sensor_id", type = IdType.AUTO)
    @ApiModelProperty("传感器的唯一标识ID")
    private Integer sensorId;

    @ApiModelProperty("传感器是否已删除的标识")
    private Boolean sensorDeleted;

    @ApiModelProperty("传感器的类别")
    private String sensorClass;

    @ApiModelProperty("关联的设备ID")
    private Integer deviceId;

    @ApiModelProperty("轮询器类型")
    private String pollerType;

    @ApiModelProperty("传感器的OID")
    private String sensorOid;

    @ApiModelProperty("传感器的索引")
    private String sensorIndex;

    @ApiModelProperty("传感器的类型")
    private String sensorType;

    @ApiModelProperty("传感器的描述信息")
    private String sensorDescr;

    @ApiModelProperty("传感器所属的组")
    @TableField("`group`")
    private String group;

    @ApiModelProperty("传感器的除数")
    private Long sensorDivisor;

    @ApiModelProperty("传感器的乘数")
    private Integer sensorMultiplier;

    @ApiModelProperty("传感器的当前值")
    private Object sensorCurrent;

    @ApiModelProperty("传感器的限制值")
    private Object sensorLimit;

    @ApiModelProperty("传感器的警告限制值")
    private Object sensorLimitWarn;

    @ApiModelProperty("传感器的低限制值")
    private Object sensorLimitLow;

    @ApiModelProperty("传感器的低警告限制值")
    private Object sensorLimitLowWarn;

    @ApiModelProperty("传感器是否触发告警的标识")
    private Boolean sensorAlert;

    @ApiModelProperty("传感器的自定义信息")
    private String sensorCustom;

    @TableField("entPhysicalIndex")
    @ApiModelProperty("实体物理索引")
    private String entPhysicalIndex;

    @TableField("entPhysicalIndex_measured")
    @ApiModelProperty("测量的实体物理索引")
    private String entphysicalindexMeasured;

    @ApiModelProperty("传感器的最后更新时间")
    private LocalDateTime lastupdate;

    @ApiModelProperty("传感器的上一个值")
    private Object sensorPrev;

    @ApiModelProperty("用户自定义函数")
    private String userFunc;

    @ApiModelProperty("RRD类型")
    private String rrdType;

    @ApiModelProperty("排序")
    private Integer sort;
}
